home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10169 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 68 61 | 6d 6c 65 74 2e 75 6e 63 |Path: ha|mlet.unc|
|00000010| 67 2e 65 64 75 21 71 5f | 7a 68 6f 6e 67 0a 46 72 |g.edu!q_|zhong.Fr|
|00000020| 6f 6d 3a 20 22 51 49 41 | 4e 20 2e 20 5a 48 4f 4e |om: "QIA|N . ZHON|
|00000030| 47 22 20 3c 71 5f 7a 68 | 6f 6e 67 40 68 61 6d 6c |G" <q_zh|ong@haml|
|00000040| 65 74 2e 75 6e 63 67 2e | 65 64 75 3e 0a 4e 65 77 |et.uncg.|edu>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 2b 2b 0a 53 | 75 62 6a 65 63 74 3a 20 |ng.c++.S|ubject: |
|00000070| 52 65 3a 20 54 65 6d 70 | 6c 61 74 65 20 64 65 63 |Re: Temp|late dec|
|00000080| 6c 61 72 61 74 69 6f 6e | 20 69 6e 20 68 20 66 69 |laration| in h fi|
|00000090| 6c 65 20 61 6e 64 20 63 | 70 70 20 66 69 6c 0a 44 |le and c|pp fil.D|
|000000a0| 61 74 65 3a 20 54 75 65 | 2c 20 35 20 4d 61 72 20 |ate: Tue|, 5 Mar |
|000000b0| 31 39 39 36 20 31 37 3a | 33 32 3a 35 33 20 2d 30 |1996 17:|32:53 -0|
|000000c0| 35 30 30 0a 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |500.Orga|nization|
|000000d0| 3a 20 54 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |: The Un|iversity|
|000000e0| 20 6f 66 20 4e 6f 72 74 | 68 20 43 61 72 6f 6c 69 | of Nort|h Caroli|
|000000f0| 6e 61 20 61 74 20 47 72 | 65 65 6e 73 62 6f 72 6f |na at Gr|eensboro|
|00000100| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 50 69 |.Message|-ID: <Pi|
|00000110| 6e 65 2e 53 4f 4c 2e 33 | 2e 39 31 2e 39 36 30 33 |ne.SOL.3|.91.9603|
|00000120| 30 35 31 37 32 39 30 38 | 2e 31 37 33 34 36 44 2d |05172908|.17346D-|
|00000130| 31 30 30 30 30 30 40 68 | 61 6d 6c 65 74 2e 75 6e |100000@h|amlet.un|
|00000140| 63 67 2e 65 64 75 3e 0a | 52 65 66 65 72 65 6e 63 |cg.edu>.|Referenc|
|00000150| 65 73 3a 20 3c 34 68 68 | 61 66 64 24 66 38 64 40 |es: <4hh|afd$f8d@|
|00000160| 61 63 61 64 65 6d 79 2e | 62 61 73 74 61 64 2e 73 |academy.|bastad.s|
|00000170| 65 3e 0a 4e 4e 54 50 2d | 50 6f 73 74 69 6e 67 2d |e>.NNTP-|Posting-|
|00000180| 48 6f 73 74 3a 20 68 61 | 6d 6c 65 74 2e 75 6e 63 |Host: ha|mlet.unc|
|00000190| 67 2e 65 64 75 0a 4d 69 | 6d 65 2d 56 65 72 73 69 |g.edu.Mi|me-Versi|
|000001a0| 6f 6e 3a 20 31 2e 30 0a | 43 6f 6e 74 65 6e 74 2d |on: 1.0.|Content-|
|000001b0| 54 79 70 65 3a 20 54 45 | 58 54 2f 50 4c 41 49 4e |Type: TE|XT/PLAIN|
|000001c0| 3b 20 63 68 61 72 73 65 | 74 3d 55 53 2d 41 53 43 |; charse|t=US-ASC|
|000001d0| 49 49 0a 43 6f 6e 74 65 | 6e 74 2d 54 72 61 6e 73 |II.Conte|nt-Trans|
|000001e0| 66 65 72 2d 45 6e 63 6f | 64 69 6e 67 3a 20 51 55 |fer-Enco|ding: QU|
|000001f0| 4f 54 45 44 2d 50 52 49 | 4e 54 41 42 4c 45 0a 49 |OTED-PRI|NTABLE.I|
|00000200| 6e 2d 52 65 70 6c 79 2d | 54 6f 3a 20 3c 34 68 68 |n-Reply-|To: <4hh|
|00000210| 61 66 64 24 66 38 64 40 | 61 63 61 64 65 6d 79 2e |afd$f8d@|academy.|
|00000220| 62 61 73 74 61 64 2e 73 | 65 3e 20 0a 0a 3d 32 30 |bastad.s|e> ..=20|
|00000230| 0a 0a 4f 6e 20 54 75 65 | 2c 20 35 20 4d 61 72 20 |..On Tue|, 5 Mar |
|00000240| 31 39 39 36 2c 20 4d 69 | 6b 61 65 6c 20 42 65 72 |1996, Mi|kael Ber|
|00000250| 67 71 76 69 73 74 20 77 | 72 6f 74 65 3a 0a 0a 3e |gqvist w|rote:..>|
|00000260| 20 48 69 21 0a 3e 3d 32 | 30 0a 3e 20 49 3d 42 34 | Hi!.>=2|0.> I=B4|
|00000270| 6d 20 68 61 76 69 6e 67 | 20 61 20 70 72 6f 62 6c |m having| a probl|
|00000280| 65 6d 20 77 69 74 68 20 | 74 68 65 20 66 6f 6c 6c |em with |the foll|
|00000290| 6f 77 69 6e 67 20 63 6f | 64 65 3a 0a 3e 3d 32 30 |owing co|de:.>=20|
|000002a0| 0a 3e 20 53 4f 52 54 2e | 48 3a 0a 3e 3d 32 30 0a |.> SORT.|H:.>=20.|
|000002b0| 3e 20 74 65 6d 70 6c 61 | 74 65 20 3c 63 6c 61 73 |> templa|te <clas|
|000002c0| 73 20 54 41 72 72 61 79 | 3e 0a 3e 20 76 6f 69 64 |s TArray|>.> void|
|000002d0| 20 51 53 6f 72 74 28 69 | 6e 74 20 6c 6f 2c 69 6e | QSort(i|nt lo,in|
|000002e0| 74 20 68 69 2c 54 41 72 | 72 61 79 20 2a 61 72 72 |t hi,TAr|ray *arr|
|000002f0| 61 79 29 3b 0a 3e 3d 32 | 30 0a 3e 20 45 4e 44 20 |ay);.>=2|0.> END |
|00000300| 53 4f 52 54 2e 48 0a 3e | 3d 32 30 0a 3e 20 53 4f |SORT.H.>|=20.> SO|
|00000310| 52 54 2e 43 50 50 0a 3e | 20 23 69 6e 63 6c 75 64 |RT.CPP.>| #includ|
|00000320| 65 20 22 73 6f 72 74 2e | 68 22 0a 3e 20 74 65 6d |e "sort.|h".> tem|
|00000330| 70 6c 61 74 65 20 3c 63 | 6c 61 73 73 20 54 41 72 |plate <c|lass TAr|
|00000340| 72 61 79 3e 0a 3e 20 76 | 6f 69 64 20 51 53 6f 72 |ray>.> v|oid QSor|
|00000350| 74 28 69 6e 74 20 6c 6f | 2c 69 6e 74 20 68 69 2c |t(int lo|,int hi,|
|00000360| 54 41 72 72 61 79 20 2a | 61 72 72 61 79 29 0a 3e |TArray *|array).>|
|00000370| 20 7b 0a 3e 3d 32 30 0a | 3e 20 2e 2e 2e 2e 2e 20 | {.>=20.|> ..... |
|00000380| 73 6f 6d 65 20 63 6f 64 | 65 0a 3e 20 7d 0a 3e 3d |some cod|e.> }.>=|
|00000390| 32 30 0a 3e 20 45 4e 44 | 20 53 4f 52 54 2e 43 50 |20.> END| SORT.CP|
|000003a0| 50 0a 3e 3d 32 30 0a 3e | 20 54 45 53 54 2e 43 50 |P.>=20.>| TEST.CP|
|000003b0| 50 0a 3e 3d 32 30 0a 3e | 20 23 69 6e 63 6c 75 64 |P.>=20.>| #includ|
|000003c0| 65 20 22 73 6f 72 74 2e | 68 22 0a 3e 3d 32 30 0a |e "sort.|h".>=20.|
|000003d0| 3e 20 69 6e 74 20 6d 61 | 69 6e 28 76 6f 69 64 29 |> int ma|in(void)|
|000003e0| 0a 3e 20 7b 0a 3e 20 3d | 30 39 69 6e 74 20 61 72 |.> {.> =|09int ar|
|000003f0| 72 61 79 5b 31 30 5d 3d | 33 44 7b 2e 2e 2e 2e 2e |ray[10]=|3D{.....|
|00000400| 2e 2e 2e 2e 7d 3b 0a 3e | 20 3d 30 39 51 53 6f 72 |....};.>| =09QSor|
|00000410| 74 28 30 2c 39 2c 61 72 | 72 61 79 29 3b 0a 3e 20 |t(0,9,ar|ray);.> |
|00000420| 7d 0a 3e 3d 32 30 0a 3e | 20 45 4e 44 20 54 45 53 |}.>=20.>| END TES|
|00000430| 54 2e 43 50 50 0a 3e 3d | 32 30 0a 3e 20 54 68 65 |T.CPP.>=|20.> The|
|00000440| 20 70 72 6f 62 6c 65 6d | 20 69 73 20 74 68 61 74 | problem| is that|
|00000450| 20 74 68 65 20 6c 69 6e | 6b 65 72 20 72 65 74 75 | the lin|ker retu|
|00000460| 72 6e 73 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |rns the |followin|
|00000470| 67 20 65 72 72 6f 72 3a | 0a 3e 20 55 6e 64 65 66 |g error:|.> Undef|
|00000480| 69 6e 64 65 64 20 73 79 | 6d 62 6f 6c 20 51 53 6f |inded sy|mbol QSo|
|00000490| 72 74 28 69 6e 74 2c 69 | 6e 74 2c 69 6e 74 20 66 |rt(int,i|nt,int f|
|000004a0| 61 72 20 2a 29 3b 20 69 | 6e 20 6d 6f 64 75 6c 65 |ar *); i|n module|
|000004b0| 20 74 65 73 74 2e 63 70 | 70 0a 3e 3d 32 30 0a 3e | test.cp|p.>=20.>|
|000004c0| 20 54 68 69 73 20 70 72 | 6f 62 6c 65 6d 20 64 6f | This pr|oblem do|
|000004d0| 65 73 65 6e 74 20 6f 63 | 63 75 72 20 69 66 20 74 |esent oc|cur if t|
|000004e0| 68 65 20 6d 61 69 6e 20 | 66 75 6e 63 74 69 6f 6e |he main |function|
|000004f0| 20 69 73 20 69 6e 20 53 | 4f 52 54 2e 43 50 50 20 | is in S|ORT.CPP |
|00000500| 62 65 6c 6f 77 0a 3e 20 | 74 68 65 20 51 53 6f 72 |below.> |the QSor|
|00000510| 74 20 66 75 6e 63 74 69 | 6f 6e 2e 3d 32 30 0a 3e |t functi|on.=20.>|
|00000520| 3d 32 30 0a 3e 20 48 45 | 4c 50 21 0a 3e 3d 32 30 |=20.> HE|LP!.>=20|
|00000530| 0a 3e 20 2f 4d 69 6b 61 | 65 6c 0a 3e 3d 32 30 0a |.> /Mika|el.>=20.|
|00000540| 0a 20 59 6f 75 20 73 68 | 6f 75 6c 64 20 70 75 74 |. You sh|ould put|
|00000550| 20 53 4f 52 54 2e 43 50 | 50 20 69 6e 74 6f 20 53 | SORT.CP|P into S|
|00000560| 4f 52 54 2e 48 20 61 6e | 64 20 69 6e 63 6c 75 64 |ORT.H an|d includ|
|00000570| 65 20 53 4f 52 54 2e 48 | 20 69 6e 74 6f 3d 32 30 |e SORT.H| into=20|
|00000580| 0a 65 76 65 72 79 20 2e | 43 50 50 20 66 69 6c 65 |.every .|CPP file|
|00000590| 73 2e 0a 3d 32 30 0a | |s..=20. | |
+--------+-------------------------+-------------------------+--------+--------+